package com.cb.common.uuidGenerator;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.safehaus.uuid.UUID;
import org.safehaus.uuid.UUIDGenerator;

public class Generator {
   public static String getGeneratorId(){
       UUIDGenerator generator  =  UUIDGenerator.getInstance();
       UUID uuid  =  generator.generateRandomBasedUUID();       
		Calendar calendar=Calendar.getInstance();		
		SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
		Date date =calendar.getTime();
		String currentTime=sdf.format(date);		
		String uid=uuid+currentTime;
		return uid;
   }
}
